<template>
  <div class="app-container">
    <el-row :gutter="20">
      <!-- 目录树 -->
      <el-col :lg="4" :md="5" :sm="6" :xs="24" class="!pr-0">
        <data-assets-query-tree
          ref="organizationTree"
          v-model="departmentId"
          @node-click="searchHandle"
        />
      </el-col>
      <el-col :lg="20" :md="19" :sm="18" :xs="24">
        <!-- 设备故障 -->
        <Equfaultinfo
          v-if="departmentId === 'equipParameter'"
          :isComponet="true"
        />
        <!-- SAP入口检验数据 -->
        <Sapentryinspectiondata
          v-if="departmentId === 'sapInspection'"
          :isComponet="true"
        />

        <!-- 设备运行参数 -->
        <EquOperatingParameters
          v-if="departmentId === 'runParameter'"
          :isComponet="true"
          :assetType="1"
        />

        <!-- 工艺参数数据库 -->
        <EquOperatingParameters
          v-if="departmentId === 'techParameter'"
          :isComponet="true"
          :assetType="2"
        />

        <!--Q-DAS过程质量数据 -->
        <QdasDetectionData v-if="departmentId === 'qDas'" :isComponet="true" />

        <!--MELO -->
        <MeloProcessQuality v-if="departmentId === 'melo'" :isComponet="true" />

        <!--ME过程质量数据 -->
        <MeDetectionData v-if="departmentId === 'me'" :isComponet="true" />

        <!--kwm过程质量数据 -->
        <KwmDetectionData v-if="departmentId === 'kwm'" :isComponet="true" />
      </el-col>
    </el-row>
  </div>
</template>

<script setup lang="ts">
import EquOperatingParameters from "@/views/cdb/equOperatingParameters/index.vue";
import EquRunParameter from "@/views/cdb/dataAssetsQuery/components/equfaultinfoList/index.vue";
import QdasDetectionData from "@/views/cdb/qdasDetectionData/index.vue";
import MeDetectionData from "@/views/cdb/meDetectionData/index.vue";
import Equfaultinfo from "@/views/cdb/equfaultinfo/index.vue";
import Sapentryinspectiondata from "@/views/cdb/sapentryinspectiondata/index.vue";
import MeloProcessQuality from "@/views/cdb/meloProcessQuality/index.vue";
import KwmDetectionData from "@/views/cdb/kwmDetectionData/index.vue";
defineOptions({
  name: "CDBDATAASSETSQUERY",
  inheritAttrs: false,
});

const organizationTree = ref();

// 初始化搜索参数数据
const departmentId = ref("qDas");

onMounted(() => {});

function searchHandle() {
  console.log("node", departmentId.value);
}
</script>
<style lang="scss" scoped>
:deep(.el-form .el-form-item__label) {
  width: 63px;
}
</style>
